/***************************************************************************
 *   Copyright (C) 2008 by Eduardo Gurgel Pinho                            *
 *   edgurgel@gmail.com                                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
***************************************************************************/

#ifndef __PHOTON_H__
#define __PHOTON_H__

#include "common/color.h"
#include "math/vector.h"

namespace Sirat {

namespace Photon_Mapping {
	
class Photon {
public:
	Photon(const Common::Color& _color,const Math::Vector& _position,const Math::Vector& _direction);
	Photon(void);
	~Photon(void);
	
	void set_color(const Common::Color&);
	void set_position(const Math::Vector&);
	void set_direction(const Math::Vector&);
	
	static void set_order(unsigned short);
	static void next_order(void);
	
	Common::Color get_color(void) const;
	Math::Vector get_position(void) const;
	Math::Vector get_direction(void) const;	
	
	static unsigned short get_order(void);

	unsigned short dimension; //Kd_Tree_Heap
private:
	Common::Color color;	
	Math::Vector position;
	Math::Vector direction;
	static unsigned short order;
};

bool compare(Photon*,Photon*);

}

}
#endif

